package com.design.command.general;
/**
 * 调用者
 * @Author:         cong zhi
 * @CreateDate:     2021/4/5 17:56
 * @UpdateUser:     cong zhi
 * @UpdateDate:     2021/4/5 17:56
 * @UpdateRemark:   修改内容
 * @Version:        1.0
 */
public class Invoker {


    private Command command;

    public Invoker(Command command) {
        this.command = command;
    }

    public void setCommand(Command command) {
        this.command = command;
    }

    public void call(){
        System.out.println("调用者执行命令command....");
        command.execute();
    }
}
